<!-- 模块说明 -->
<script setup lang='ts'>
// @ts-ignore
import {ref,onMounted} from 'vue';
// @ts-ignore
import { useRoute } from "vue-router";
// @ts-ignore
import { Product } from "../../api"

const route = useRoute();
const searchname = ref(route.params.value) 
const searchList = ref();


const getlist = async()=>{
  let res = await  Product['list']()
  console.log(res,"列表");
   searchList.value = res.data.filter((item:any)=>item.proname == searchname.value)
}
// console.log(searchList.value,"9999");


 onMounted(()=>{
  getlist();
 })
</script>
<template>
<div class="box">
    <Pro v-for="item in searchList" :key="item.id" :info="item"></Pro>
</div>
</template>

<style lang="scss" scoped>

</style>
